palindrome number c#

99

palindrome number c# -

    static bool IsPalindrome(int n)
    {
        return n.ToString() == Reverse(n.ToString());
    }

    static string Reverse(string str)
    {
        return new string(str.ToCharArray().Reverse().ToArray());
    }

Comments

Submit
0 Comments